package com.inspinia.base.web.simple.libs.filter;


import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;

/**
 * Created by veblen on 2017/4/13.
 */
public class MySiteMeshFilter extends ConfigurableSiteMeshFilter {

    @Override
    protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
        // 默认的装饰器
        // Map default decorator. This shall be applied to all paths if no other paths match.
        builder.addDecoratorPath("/home", "/decorators/default")
                // 配置不被装饰的路径
                // Exclude path from decoration.
                .addExcludedPath("/public/*")
                .addExcludedPath("/pages/*")
                .addExcludedPath("/login");

        // 配置自己的MineType
        builder.setMimeTypes("text/html");
    }
}